package com.wjj.sixinone.controller.admin;

import com.wjj.sixinone.common.enums.ApiTypeConst;
import com.wjj.sixinone.common.util.Result;
import com.wjj.sixinone.service.FileUploadService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping(ApiTypeConst.API_ADMIN + "/file")
public class FileUploadController {
    @Resource
    private FileUploadService uploadService;

    @RequestMapping("/fileUpload")
    public Result upload(MultipartFile file ,Integer id) {
        return uploadService.fileUpload(file,id);


    }

    @RequestMapping("/drug/fileUpload")
    public Result drugUpload(MultipartFile file,Integer id){
        return uploadService.drugUpload(file,id);
    }
    @RequestMapping("/instrument/fileUpload")
    public Result instrumentUpload(MultipartFile file,Integer id){
        return uploadService.instrumentUpload(file,id);
    }
    @RequestMapping("/employee/fileUpload")
    public Result employeeUpload(MultipartFile file,Integer id){
        return uploadService.employeeUpload(file,id);
    }
}
